<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=1200, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!--
    <div class="buttons">
        <button>Press 1</button>
        <button>Press 2</button>
        <button>Press 3</button>
    </div>
    <script>
        const buttonContainer = document.querySelector('.buttons')
        console.log('buttonContainer', buttonContainer)
        buttonContainer.addEventListener('click', event => {
            console.log(event.target.value)
        })
    </script>
-->

<button id="btnClick">click me</button>

<script>
    const oButton = document.querySelector("#btnClick")

    // 事件处理函数
    const clickMe = () =>  {
        console.log('you are clicking me!')
    }
    const click2 = () => {
        console.log('你又输出了一个')
    }
    //oButton.onclick = clickMe;
    oButton.addEventListener('click', clickMe);
    oButton.addEventListener('click', click2)

</script>

</body>

</html>